test for consistency of equation by matrix method engineering mathematics